Closed Bug 1838086 Opened 2 years ago Closed 1 year ago

Console create instance reads the maxLogLevel pref on every log

Categories

(DevTools :: Console, task, P3)

task

Tracking

(Performance Impact:none)

RESOLVED DUPLICATE of bug 1876589
Performance Impact none

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(2 obsolete files)

Translations is a heavy user of console.createInstance to allow for debug-only logging. However, this keeps on tripping up the browser/base/content/test/performance/browser_preferences_usage.js test. I investigated and it appears that the log level mechanism reads the preference on every single log call, rather than retaining the preference value, and updating it via an observer.

This change fixes Bug 1835693.

This change is covered by dom/console/tests/test_jsm.xhtml

This change is covered by dom/console/tests/test_jsm.xhtml

Attachment #9338738 - Attachment is obsolete: true
Blocks: 1835693

I'm guessing this isn't a huge perf impact at the moment, but I'm wondering what might happen if we transition all front-end logging to it.

Blocks: OneLogger
Performance Impact: --- → ?
Keywords: perf
Blocks: 1862992

It shows up a bit, mostly in profiler markers though. This hasn't been a huge priority to go back and handle the review comments, although I would like to. The biggest blocker is tripping browser/base/content/test/performance/browser_preferences_usage.js.

(In reply to Mark Banner (:standard8) from comment #3)

I'm guessing this isn't a huge perf impact at the moment, but I'm wondering what might happen if we transition all front-end logging to it.

Hi Mark, this type of ticket falls outside of the scope of a performance impact triage calculator. Our suggestion would be to reach out to the performance team using #perf-help in Slack to get some more specific assistance in reviewing the logging story. We'll best be able to assess perf impacts from there. Thanks

Performance Impact: ? → none

I'd forgotten about this bug and I've just fixed it in bug 1876589.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1876589
Resolution: --- → DUPLICATE
No longer blocks: 1862992
Attachment #9338740 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: